package com.itheima;

import com.itheima.fegin.BlogWebFegin;
import com.itheima.utils.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * Created by lenovo on 2020/7/1.
 */
@EnableEurekaClient
@SpringBootApplication(scanBasePackages = "com.itheima")
@EntityScan("com.itheima.pojo")
@MapperScan(basePackages = "com.itheima.dao")
@EnableFeignClients(clients = BlogWebFegin.class)
public class WebApplication {
    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class);
    }
    @Bean
    public IdWorker idWorker(){
        return new IdWorker();

}}
